package com.suixun.domain;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 操作指南
 * </p>
 *
 * @author jacky
 * @since 2018-01-11
 */
@TableName("instructions")
public class Instructions extends Model<Instructions> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 图片路径
     */
    @TableField("img_url")
    @Size(max = 200, message = "图片路径长度不能大于200")
    @NotBlank(message = "图片路径不能为空")
    private String imgUrl;
    /**
     * 标题
     */
    @Size(max = 50, message = "标题长度不能大于50")
    @NotBlank(message = "标题不能为空")
    private String title;
    /**
     * 视频路径
     */
    @TableField("media_url")
    @Size(max = 200, message = "视频路径长度不能大于200")
    @NotBlank(message = "视频路径不能为空")
    private String mediaUrl;
    /**
     * 类型：1家长端 2教师端
     */
    private Integer type;
    /**
     * 置顶
     */
    private String top;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;

    @TableField("is_show")
    private Integer isShow;

    /**
     * 视频预览图
     */
    @Size(max = 200, message = "预览图路径长度不能大于200")
    @NotBlank(message = "预览图路径不能为空")
    @TableField("preview_url")
    private String previewUrl;

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getMediaUrl() {
        return mediaUrl;
    }

    public void setMediaUrl(String mediaUrl) {
        this.mediaUrl = mediaUrl;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTop() {
        return top;
    }

    public void setTop(String top) {
        this.top = top;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getPreviewUrl() {
        return previewUrl;
    }

    public void setPreviewUrl(String previewUrl) {
        this.previewUrl = previewUrl;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Instructions{" +
                ", id=" + id +
                ", imgUrl=" + imgUrl +
                ", title=" + title +
                ", mediaUrl=" + mediaUrl +
                ", type=" + type +
                ", top=" + top +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                "}";
    }
}
